1. Field of the Invention
This invention relates generally to scheduling the tasks for a peripheral device in a data processing system during a power failure, and more specifically to scheduling the completion of tasks for a peripheral device during a power failure in a data processing system and after power is restored.
2. Description of the Prior Art
In many data processing systems (e.g., computer systems, programmable electronic systems, telecommunication switching systems, control systems, and so forth) a power failure may occur while a peripheral device is performing one or more tasks scheduled for that peripheral device.
FIG. 1 illustrates a prior art approach for handling power failures in a data processing system 100. Data processing system 100 includes an uninterruptible power supply (UPS) 106 that can briefly supply all the electrical power required to operate the core 102 of the data processing system and a peripheral device 104 (e.g., a printer or other I/O device). The UPS may or may not provide sufficient time for peripheral 104 to perform one or more scheduled tasks, such as printing one or more files. If the UPS does not provide sufficient time, then the tasks are not completed and are possibly deleted from the task queue for the peripheral. Furthermore, a larger data processing system requires a larger and more expensive UPS with a larger power capacity. It is often impractical to buy a UPS that can supply an entire data processing system, because the price and size of a higher capacity UPS rapidly increases for higher power capacities.
It would be desirable to have the capability to reliably insure that the occurrence of a power failure during the operation of a peripheral device in a data processing system will not prevent the completion of each scheduled peripheral task. It would also be desirable to provide an apparatus and method to handle power failures and the restoration of power without requiring a large and expensive UPS with the power capacity to supply power for an entire data processing system.